3.5.50 \(\int \frac {(g+h x)^2}{(a+b \log (c (d (e+f x)^p)^q))^2} \, dx\) [450]

3.5.50.1 Optimal result
3.5.50.2 Mathematica [B] (verified)
3.5.50.3 Rubi [A] (verified)
3.5.50.4 Maple [F]
3.5.50.5 Fricas [A] (verification not implemented)
3.5.50.6 Sympy [F]
3.5.50.7 Maxima [F]
3.5.50.8 Giac [B] (verification not implemented)
3.5.50.9 Mupad [F(-1)]

3.5.50.1 Optimal result

Integrand size = 28, antiderivative size = 326 \[ \int \frac {(g+h x)^2}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=\frac {e^{-\frac {a}{b p q}} (f g-e h)^2 (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )}{b^2 f^3 p^2 q^2}+\frac {4 e^{-\frac {2 a}{b p q}} h (f g-e h) (e+f x)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b^2 f^3 p^2 q^2}+\frac {3 e^{-\frac {3 a}{b p q}} h^2 (e+f x)^3 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {3}{p q}} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b^2 f^3 p^2 q^2}-\frac {(e+f x) (g+h x)^2}{b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )} \]

output
(-e*h+f*g)^2*(f*x+e)*Ei((a+b*ln(c*(d*(f*x+e)^p)^q))/b/p/q)/b^2/exp(a/b/p/q 
)/f^3/p^2/q^2/((c*(d*(f*x+e)^p)^q)^(1/p/q))+4*h*(-e*h+f*g)*(f*x+e)^2*Ei(2* 
(a+b*ln(c*(d*(f*x+e)^p)^q))/b/p/q)/b^2/exp(2*a/b/p/q)/f^3/p^2/q^2/((c*(d*( 
f*x+e)^p)^q)^(2/p/q))+3*h^2*(f*x+e)^3*Ei(3*(a+b*ln(c*(d*(f*x+e)^p)^q))/b/p 
/q)/b^2/exp(3*a/b/p/q)/f^3/p^2/q^2/((c*(d*(f*x+e)^p)^q)^(3/p/q))-(f*x+e)*( 
h*x+g)^2/b/f/p/q/(a+b*ln(c*(d*(f*x+e)^p)^q))
 
3.5.50.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(1310\) vs. \(2(326)=652\).

Time = 0.41 (sec) , antiderivative size = 1310, normalized size of antiderivative = 4.02 \[ \int \frac {(g+h x)^2}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx =\text {Too large to display} \]

input
Integrate[(g + h*x)^2/(a + b*Log[c*(d*(e + f*x)^p)^q])^2,x]
 
output
(-(b*e*E^((3*a)/(b*p*q))*f^2*g^2*p*q*(c*(d*(e + f*x)^p)^q)^(3/(p*q))) - b* 
E^((3*a)/(b*p*q))*f^3*g^2*p*q*x*(c*(d*(e + f*x)^p)^q)^(3/(p*q)) - 2*b*e*E^ 
((3*a)/(b*p*q))*f^2*g*h*p*q*x*(c*(d*(e + f*x)^p)^q)^(3/(p*q)) - 2*b*E^((3* 
a)/(b*p*q))*f^3*g*h*p*q*x^2*(c*(d*(e + f*x)^p)^q)^(3/(p*q)) - b*e*E^((3*a) 
/(b*p*q))*f^2*h^2*p*q*x^2*(c*(d*(e + f*x)^p)^q)^(3/(p*q)) - b*E^((3*a)/(b* 
p*q))*f^3*h^2*p*q*x^3*(c*(d*(e + f*x)^p)^q)^(3/(p*q)) + a*E^((2*a)/(b*p*q) 
)*f^2*g^2*(e + f*x)*(c*(d*(e + f*x)^p)^q)^(2/(p*q))*ExpIntegralEi[(a + b*L 
og[c*(d*(e + f*x)^p)^q])/(b*p*q)] - 2*a*e*E^((2*a)/(b*p*q))*f*g*h*(e + f*x 
)*(c*(d*(e + f*x)^p)^q)^(2/(p*q))*ExpIntegralEi[(a + b*Log[c*(d*(e + f*x)^ 
p)^q])/(b*p*q)] + a*e^2*E^((2*a)/(b*p*q))*h^2*(e + f*x)*(c*(d*(e + f*x)^p) 
^q)^(2/(p*q))*ExpIntegralEi[(a + b*Log[c*(d*(e + f*x)^p)^q])/(b*p*q)] + 4* 
a*E^(a/(b*p*q))*f*g*h*(e + f*x)^2*(c*(d*(e + f*x)^p)^q)^(1/(p*q))*ExpInteg 
ralEi[(2*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(b*p*q)] - 4*a*e*E^(a/(b*p*q))* 
h^2*(e + f*x)^2*(c*(d*(e + f*x)^p)^q)^(1/(p*q))*ExpIntegralEi[(2*(a + b*Lo 
g[c*(d*(e + f*x)^p)^q]))/(b*p*q)] + 3*a*h^2*(e + f*x)^3*ExpIntegralEi[(3*( 
a + b*Log[c*(d*(e + f*x)^p)^q]))/(b*p*q)] + b*E^((2*a)/(b*p*q))*f^2*g^2*(e 
 + f*x)*(c*(d*(e + f*x)^p)^q)^(2/(p*q))*ExpIntegralEi[(a + b*Log[c*(d*(e + 
 f*x)^p)^q])/(b*p*q)]*Log[c*(d*(e + f*x)^p)^q] - 2*b*e*E^((2*a)/(b*p*q))*f 
*g*h*(e + f*x)*(c*(d*(e + f*x)^p)^q)^(2/(p*q))*ExpIntegralEi[(a + b*Log[c* 
(d*(e + f*x)^p)^q])/(b*p*q)]*Log[c*(d*(e + f*x)^p)^q] + b*e^2*E^((2*a)/...
 
3.5.50.3 Rubi [A] (verified)

Time = 1.76 (sec) , antiderivative size = 538, normalized size of antiderivative = 1.65, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2895, 2847, 2846, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(g+h x)^2}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx\)

\(\Big \downarrow \) 2895

\(\displaystyle \int \frac {(g+h x)^2}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}dx\)

\(\Big \downarrow \) 2847

\(\displaystyle -\frac {2 (f g-e h) \int \frac {g+h x}{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}dx}{b f p q}+\frac {3 \int \frac {(g+h x)^2}{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}dx}{b p q}-\frac {(e+f x) (g+h x)^2}{b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}\)

\(\Big \downarrow \) 2846

\(\displaystyle \frac {3 \int \left (\frac {(f g-e h)^2}{f^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}+\frac {2 h (e+f x) (f g-e h)}{f^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}+\frac {h^2 (e+f x)^2}{f^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}\right )dx}{b p q}-\frac {2 (f g-e h) \int \left (\frac {f g-e h}{f \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}+\frac {h (e+f x)}{f \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}\right )dx}{b f p q}-\frac {(e+f x) (g+h x)^2}{b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {3 \left (\frac {2 h (e+f x)^2 e^{-\frac {2 a}{b p q}} (f g-e h) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b f^3 p q}+\frac {(e+f x) e^{-\frac {a}{b p q}} (f g-e h)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )}{b f^3 p q}+\frac {h^2 (e+f x)^3 e^{-\frac {3 a}{b p q}} \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {3}{p q}} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b f^3 p q}\right )}{b p q}-\frac {2 (f g-e h) \left (\frac {(e+f x) e^{-\frac {a}{b p q}} (f g-e h) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )}{b f^2 p q}+\frac {h (e+f x)^2 e^{-\frac {2 a}{b p q}} \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b f^2 p q}\right )}{b f p q}-\frac {(e+f x) (g+h x)^2}{b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}\)

input
Int[(g + h*x)^2/(a + b*Log[c*(d*(e + f*x)^p)^q])^2,x]
 
output
(-2*(f*g - e*h)*(((f*g - e*h)*(e + f*x)*ExpIntegralEi[(a + b*Log[c*(d*(e + 
 f*x)^p)^q])/(b*p*q)])/(b*E^(a/(b*p*q))*f^2*p*q*(c*(d*(e + f*x)^p)^q)^(1/( 
p*q))) + (h*(e + f*x)^2*ExpIntegralEi[(2*(a + b*Log[c*(d*(e + f*x)^p)^q])) 
/(b*p*q)])/(b*E^((2*a)/(b*p*q))*f^2*p*q*(c*(d*(e + f*x)^p)^q)^(2/(p*q))))) 
/(b*f*p*q) + (3*(((f*g - e*h)^2*(e + f*x)*ExpIntegralEi[(a + b*Log[c*(d*(e 
 + f*x)^p)^q])/(b*p*q)])/(b*E^(a/(b*p*q))*f^3*p*q*(c*(d*(e + f*x)^p)^q)^(1 
/(p*q))) + (2*h*(f*g - e*h)*(e + f*x)^2*ExpIntegralEi[(2*(a + b*Log[c*(d*( 
e + f*x)^p)^q]))/(b*p*q)])/(b*E^((2*a)/(b*p*q))*f^3*p*q*(c*(d*(e + f*x)^p) 
^q)^(2/(p*q))) + (h^2*(e + f*x)^3*ExpIntegralEi[(3*(a + b*Log[c*(d*(e + f* 
x)^p)^q]))/(b*p*q)])/(b*E^((3*a)/(b*p*q))*f^3*p*q*(c*(d*(e + f*x)^p)^q)^(3 
/(p*q)))))/(b*p*q) - ((e + f*x)*(g + h*x)^2)/(b*f*p*q*(a + b*Log[c*(d*(e + 
 f*x)^p)^q]))
 

3.5.50.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2846
Int[((f_.) + (g_.)*(x_))^(q_.)/((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.) 
]*(b_.)), x_Symbol] :> Int[ExpandIntegrand[(f + g*x)^q/(a + b*Log[c*(d + e* 
x)^n]), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0] & 
& IGtQ[q, 0]
 

rule 2847
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_. 
)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)*(f + g*x)^q*((a + b*Log[c*(d + e 
*x)^n])^(p + 1)/(b*e*n*(p + 1))), x] + (-Simp[(q + 1)/(b*n*(p + 1))   Int[( 
f + g*x)^q*(a + b*Log[c*(d + e*x)^n])^(p + 1), x], x] + Simp[q*((e*f - d*g) 
/(b*e*n*(p + 1)))   Int[(f + g*x)^(q - 1)*(a + b*Log[c*(d + e*x)^n])^(p + 1 
), x], x]) /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0] && Lt 
Q[p, -1] && GtQ[q, 0]
 

rule 2895
Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_. 
)*(u_.), x_Symbol] :> Subst[Int[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], 
 c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e, f, m, 
 n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[ 
IntHide[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x]]
 
3.5.50.4 Maple [F]

\[\int \frac {\left (h x +g \right )^{2}}{{\left (a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )\right )}^{2}}d x\]

input
int((h*x+g)^2/(a+b*ln(c*(d*(f*x+e)^p)^q))^2,x)
 
output
int((h*x+g)^2/(a+b*ln(c*(d*(f*x+e)^p)^q))^2,x)
 
3.5.50.5 Fricas [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 573, normalized size of antiderivative = 1.76 \[ \int \frac {(g+h x)^2}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=\frac {{\left (4 \, {\left (a f g h - a e h^{2} + {\left (b f g h - b e h^{2}\right )} p q \log \left (f x + e\right ) + {\left (b f g h - b e h^{2}\right )} q \log \left (d\right ) + {\left (b f g h - b e h^{2}\right )} \log \left (c\right )\right )} e^{\left (\frac {b q \log \left (d\right ) + b \log \left (c\right ) + a}{b p q}\right )} \operatorname {log\_integral}\left ({\left (f^{2} x^{2} + 2 \, e f x + e^{2}\right )} e^{\left (\frac {2 \, {\left (b q \log \left (d\right ) + b \log \left (c\right ) + a\right )}}{b p q}\right )}\right ) + {\left (a f^{2} g^{2} - 2 \, a e f g h + a e^{2} h^{2} + {\left (b f^{2} g^{2} - 2 \, b e f g h + b e^{2} h^{2}\right )} p q \log \left (f x + e\right ) + {\left (b f^{2} g^{2} - 2 \, b e f g h + b e^{2} h^{2}\right )} q \log \left (d\right ) + {\left (b f^{2} g^{2} - 2 \, b e f g h + b e^{2} h^{2}\right )} \log \left (c\right )\right )} e^{\left (\frac {2 \, {\left (b q \log \left (d\right ) + b \log \left (c\right ) + a\right )}}{b p q}\right )} \operatorname {log\_integral}\left ({\left (f x + e\right )} e^{\left (\frac {b q \log \left (d\right ) + b \log \left (c\right ) + a}{b p q}\right )}\right ) - {\left (b f^{3} h^{2} p q x^{3} + b e f^{2} g^{2} p q + {\left (2 \, b f^{3} g h + b e f^{2} h^{2}\right )} p q x^{2} + {\left (b f^{3} g^{2} + 2 \, b e f^{2} g h\right )} p q x\right )} e^{\left (\frac {3 \, {\left (b q \log \left (d\right ) + b \log \left (c\right ) + a\right )}}{b p q}\right )} + 3 \, {\left (b h^{2} p q \log \left (f x + e\right ) + b h^{2} q \log \left (d\right ) + b h^{2} \log \left (c\right ) + a h^{2}\right )} \operatorname {log\_integral}\left ({\left (f^{3} x^{3} + 3 \, e f^{2} x^{2} + 3 \, e^{2} f x + e^{3}\right )} e^{\left (\frac {3 \, {\left (b q \log \left (d\right ) + b \log \left (c\right ) + a\right )}}{b p q}\right )}\right )\right )} e^{\left (-\frac {3 \, {\left (b q \log \left (d\right ) + b \log \left (c\right ) + a\right )}}{b p q}\right )}}{b^{3} f^{3} p^{3} q^{3} \log \left (f x + e\right ) + b^{3} f^{3} p^{2} q^{3} \log \left (d\right ) + b^{3} f^{3} p^{2} q^{2} \log \left (c\right ) + a b^{2} f^{3} p^{2} q^{2}} \]

input
integrate((h*x+g)^2/(a+b*log(c*(d*(f*x+e)^p)^q))^2,x, algorithm="fricas")
 
output
(4*(a*f*g*h - a*e*h^2 + (b*f*g*h - b*e*h^2)*p*q*log(f*x + e) + (b*f*g*h - 
b*e*h^2)*q*log(d) + (b*f*g*h - b*e*h^2)*log(c))*e^((b*q*log(d) + b*log(c) 
+ a)/(b*p*q))*log_integral((f^2*x^2 + 2*e*f*x + e^2)*e^(2*(b*q*log(d) + b* 
log(c) + a)/(b*p*q))) + (a*f^2*g^2 - 2*a*e*f*g*h + a*e^2*h^2 + (b*f^2*g^2 
- 2*b*e*f*g*h + b*e^2*h^2)*p*q*log(f*x + e) + (b*f^2*g^2 - 2*b*e*f*g*h + b 
*e^2*h^2)*q*log(d) + (b*f^2*g^2 - 2*b*e*f*g*h + b*e^2*h^2)*log(c))*e^(2*(b 
*q*log(d) + b*log(c) + a)/(b*p*q))*log_integral((f*x + e)*e^((b*q*log(d) + 
 b*log(c) + a)/(b*p*q))) - (b*f^3*h^2*p*q*x^3 + b*e*f^2*g^2*p*q + (2*b*f^3 
*g*h + b*e*f^2*h^2)*p*q*x^2 + (b*f^3*g^2 + 2*b*e*f^2*g*h)*p*q*x)*e^(3*(b*q 
*log(d) + b*log(c) + a)/(b*p*q)) + 3*(b*h^2*p*q*log(f*x + e) + b*h^2*q*log 
(d) + b*h^2*log(c) + a*h^2)*log_integral((f^3*x^3 + 3*e*f^2*x^2 + 3*e^2*f* 
x + e^3)*e^(3*(b*q*log(d) + b*log(c) + a)/(b*p*q))))*e^(-3*(b*q*log(d) + b 
*log(c) + a)/(b*p*q))/(b^3*f^3*p^3*q^3*log(f*x + e) + b^3*f^3*p^2*q^3*log( 
d) + b^3*f^3*p^2*q^2*log(c) + a*b^2*f^3*p^2*q^2)
 
3.5.50.6 Sympy [F]

\[ \int \frac {(g+h x)^2}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=\int \frac {\left (g + h x\right )^{2}}{\left (a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}\right )^{2}}\, dx \]

input
integrate((h*x+g)**2/(a+b*ln(c*(d*(f*x+e)**p)**q))**2,x)
 
output
Integral((g + h*x)**2/(a + b*log(c*(d*(e + f*x)**p)**q))**2, x)
 
3.5.50.7 Maxima [F]

\[ \int \frac {(g+h x)^2}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=\int { \frac {{\left (h x + g\right )}^{2}}{{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}} \,d x } \]

input
integrate((h*x+g)^2/(a+b*log(c*(d*(f*x+e)^p)^q))^2,x, algorithm="maxima")
 
output
-(f*h^2*x^3 + e*g^2 + (2*f*g*h + e*h^2)*x^2 + (f*g^2 + 2*e*g*h)*x)/(b^2*f* 
p*q*log(((f*x + e)^p)^q) + a*b*f*p*q + (f*p*q^2*log(d) + f*p*q*log(c))*b^2 
) + integrate((3*f*h^2*x^2 + f*g^2 + 2*e*g*h + 2*(2*f*g*h + e*h^2)*x)/(b^2 
*f*p*q*log(((f*x + e)^p)^q) + a*b*f*p*q + (f*p*q^2*log(d) + f*p*q*log(c))* 
b^2), x)
 
3.5.50.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 3975 vs. \(2 (328) = 656\).

Time = 0.46 (sec) , antiderivative size = 3975, normalized size of antiderivative = 12.19 \[ \int \frac {(g+h x)^2}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=\text {Too large to display} \]

input
integrate((h*x+g)^2/(a+b*log(c*(d*(f*x+e)^p)^q))^2,x, algorithm="giac")
 
output
-(f*x + e)*b*f^2*g^2*p*q/(b^3*f^3*p^3*q^3*log(f*x + e) + b^3*f^3*p^2*q^3*l 
og(d) + b^3*f^3*p^2*q^2*log(c) + a*b^2*f^3*p^2*q^2) - 2*(f*x + e)^2*b*f*g* 
h*p*q/(b^3*f^3*p^3*q^3*log(f*x + e) + b^3*f^3*p^2*q^3*log(d) + b^3*f^3*p^2 
*q^2*log(c) + a*b^2*f^3*p^2*q^2) + 2*(f*x + e)*b*e*f*g*h*p*q/(b^3*f^3*p^3* 
q^3*log(f*x + e) + b^3*f^3*p^2*q^3*log(d) + b^3*f^3*p^2*q^2*log(c) + a*b^2 
*f^3*p^2*q^2) - (f*x + e)^3*b*h^2*p*q/(b^3*f^3*p^3*q^3*log(f*x + e) + b^3* 
f^3*p^2*q^3*log(d) + b^3*f^3*p^2*q^2*log(c) + a*b^2*f^3*p^2*q^2) + 2*(f*x 
+ e)^2*b*e*h^2*p*q/(b^3*f^3*p^3*q^3*log(f*x + e) + b^3*f^3*p^2*q^3*log(d) 
+ b^3*f^3*p^2*q^2*log(c) + a*b^2*f^3*p^2*q^2) - (f*x + e)*b*e^2*h^2*p*q/(b 
^3*f^3*p^3*q^3*log(f*x + e) + b^3*f^3*p^2*q^3*log(d) + b^3*f^3*p^2*q^2*log 
(c) + a*b^2*f^3*p^2*q^2) + b*f^2*g^2*p*q*Ei(log(d)/p + log(c)/(p*q) + a/(b 
*p*q) + log(f*x + e))*e^(-a/(b*p*q))*log(f*x + e)/((b^3*f^3*p^3*q^3*log(f* 
x + e) + b^3*f^3*p^2*q^3*log(d) + b^3*f^3*p^2*q^2*log(c) + a*b^2*f^3*p^2*q 
^2)*c^(1/(p*q))*d^(1/p)) - 2*b*e*f*g*h*p*q*Ei(log(d)/p + log(c)/(p*q) + a/ 
(b*p*q) + log(f*x + e))*e^(-a/(b*p*q))*log(f*x + e)/((b^3*f^3*p^3*q^3*log( 
f*x + e) + b^3*f^3*p^2*q^3*log(d) + b^3*f^3*p^2*q^2*log(c) + a*b^2*f^3*p^2 
*q^2)*c^(1/(p*q))*d^(1/p)) + b*e^2*h^2*p*q*Ei(log(d)/p + log(c)/(p*q) + a/ 
(b*p*q) + log(f*x + e))*e^(-a/(b*p*q))*log(f*x + e)/((b^3*f^3*p^3*q^3*log( 
f*x + e) + b^3*f^3*p^2*q^3*log(d) + b^3*f^3*p^2*q^2*log(c) + a*b^2*f^3*p^2 
*q^2)*c^(1/(p*q))*d^(1/p)) + 4*b*f*g*h*p*q*Ei(2*log(d)/p + 2*log(c)/(p*...
 
3.5.50.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(g+h x)^2}{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2} \, dx=\int \frac {{\left (g+h\,x\right )}^2}{{\left (a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\right )}^2} \,d x \]

input
int((g + h*x)^2/(a + b*log(c*(d*(e + f*x)^p)^q))^2,x)
 
output
int((g + h*x)^2/(a + b*log(c*(d*(e + f*x)^p)^q))^2, x)